import axios from '@/libs/api.request';

/**
 * 生成临时砍价订单
 */
export const createKanJiaOrder = (goods_id,sku_id) => {
  return axios.request({
    url: 'KanJia/createOrder',
    method: 'get',
    params:{goods_id:goods_id,sku_id:sku_id}
  })
};
/**
 * 砍价
 */
export const kanJia = (id) => {
  return axios.request({
    url: 'KanJia/kanJia',
    method: 'get',
    params:{kanjia_order_id:id}
  })
};
/**
 * 获取帮助人员信息
 */
export const getHelp = (params) => {
  return axios.request({
    url: 'KanJia/getHelp',
    method: 'get',
    params:params
  })
};
/**
 * 获取详情
 */
export const getKanJiaOrder = (id) => {
  return axios.request({
    url: 'KanJia/get',
    method: 'get',
    params:{kanjia_order_id:id}
  })
};
/**
 * 关闭支付订单
 */
export const close = (id) => {
  return axios.request({
    url: 'KanJia/close',
    method: 'get',
    params:{kanjia_order_id:id}
  })
};

/**
 * 订单列表
 */
export const getOrderList = (params) => {
  return axios.request({
    url: 'KanJia/getOrderList',
    method: 'get',
    params:params
  })
};


